const { VITE_HIDE_HOME } = import.meta.env;
const Layout = () => import("@/layout/index.vue");

export default {
  path: "/",
  name: "Home",
  component: Layout,
  redirect: "/welcome",
  meta: {
    icon: "homeFilled",
    title: "首页",
    rank: 0,
  },
  children: [
    {
      path: "/welcome",
      name: "Welcome",
      component: () => import("@/views/welcome/index.vue"),
      meta: {
        title: "首页",
        roles: ["admin"],
        showLink: VITE_HIDE_HOME === "true" ? false : true,
      },
    },
    {
      path: "/map",
      name: "Map",
      component: () => import("@/views/chart/map/Map.vue"),
      meta: {
        title: "地图",
        showLink: false,
      },
    },
    {
      path: "/shanxi",
      name: "ShanxiMap",
      component: () => import("@/views/chart/map/ShanxiMap.vue"),
      meta: {
        title: "地图",
        showLink: false,
      },
    },
    {
      path: "/test",
      name: "test",
      component: () => import("@/views/chart/Radar.vue"),
      meta: {
        title: "测试",
        showLink: false,
      },
    },
    {
      path: "/play",
      name: "play",
      component: () => import("@/views/play/index.vue"),
      meta: {
        title: "测试",
        showLink: false,
      },
    },
    {
      path: "/gatherline",
      name: "gatherline",
      component: () => import("@/views/gather/gatherchart/gatherchart.vue"),
      meta: {
        title: "汇总图",
        showLink: false,
      },
    },
    {
      path: "/screen",
      name: "screen",
      component: () => import("@/views/bigscreen/screen.vue"),
      meta: {
        title: "态势大屏",
        showLink: false,
      },
    },
    {
      path: "/xmap",
      name: "xmap",
      component: () => import("@/views/chart/pathmap/pathmap.vue"),
      meta: {
        title: "路径图",
        showLink: false,
      },
    },
  ],
} as RouteConfigsTable;
